//* space rock, contain no credits but when you colide with it it will took your life

alien_rock_images = new Images('rock',1);

function AlienRock() {
  // contructor
  var that = new Alien();
  that.images = alien_rock_images;
  that.shrapnel = 10;
  that.credit = 0;
  that.da = Math.random()/10;
  that.dx = 2*(Math.random()-Math.random()); 
  that.dy = 2*(Math.random()-Math.random()); 
  
  // update dummy
  that.update = function() {
    // rotate them slowly
    this.angle += this.da;
    // point it slightly to earth
    var r = Math.sqrt(this.x*this.x+this.y*this.y)+10;
    this.dx -= this.x/(r*r);
    this.dy -= this.y/(r*r);
    // move dummy
    this.simpleMove();
    // if it is too close the earh, let it burn in atmoshere
    if (r<=40)
      this.life--;
  }
 
  return that;
}

function AlienRocks(ACount) {
  // create aliens
  var that = new Array();
  for (var i=0; i<ACount; i++)
      that.push(new AlienRock());
  return that;  
}
